const db = wx.cloud.database()
Page({
  data: {
    boxlist: 
    [
      {
        name:"在线报修",
        url:"/images/repair.png"
      },
        {
          name: "管理员",
          url: "/images/admin.png"
        }
    ],
  },

  onLoad: function (options) {
    var phone = wx.getStorageSync('phone');
    if (phone == "") {
      wx.navigateTo({
        url: '../login/login'
      })
    }
  },

  enterapplication: function (event) {
    var id = event.currentTarget.dataset.id
    switch (id) {
      case '在线报修':
        wx.navigateTo({ url: '../repairtab/repairtab' })
        break;
      case '管理员':
        wx.navigateTo({ url: '../repairtabadmin/repairtabadmin' })
        break;
      default:
        break;
    }
  },
})
